//
//  HMHomeGoldSentenceVM.m
//  HowToDo
//
//  Created by 胡坤 on 2017/1/5.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMHomeGoldSentenceVM.h"
#import "HMNetWorkTool.h"
#import "HMGoldSentence.h"
#import <YYModel.h>
@implementation HMHomeGoldSentenceVM

-(void)loadGoldSentenceData:(void(^)(NSError *error))finishedCallBack
{
    [[HMNetWorkTool sharedTool]requestGoldSentenceWithType:HTDGET Finished:^(id responseObject)
    {
        NSArray* dataList = responseObject[@"data"];
        self.goldSMList = [NSArray yy_modelArrayWithClass:[HMGoldSentence class] json:dataList];
        finishedCallBack(nil);
    } Failed:^(NSError *error)
    {
        finishedCallBack(error);
    }];
}
-(NSArray<HMGoldSentence *> *)goldSMList
{
    if (!_goldSMList)
    {
        _goldSMList = [NSArray array];
    }
    return _goldSMList;
}

@end
